From 570c185935d87dd22a988fee0fdc5e29aa3bf538 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 19 Jun 2011 19:28:47 -0400 Subject: [PATCH] Make the dumped output a bit more readable By adding sections for each interface. --- tests/a11y/accessibility-dump.c | 14 ++++++++++++++ tests/a11y/accessible-name.txt | 3 +++ tests/a11y/hello-world.txt | 3 +++ tests/a11y/link.txt | 4 ++++ tests/a11y/mnemonic.txt | 3 +++ tests/a11y/notebook.txt | 9 +++++++++ tests/a11y/range.txt | 3 +++ tests/a11y/text.txt | 2 ++ 8 files changed, 41 insertions(+) diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c index 522ed386dd..be0950b0b5 100644 --- a/tests/a11y/accessibility-dump.c +++ b/tests/a11y/accessibility-dump.c @@ -272,6 +272,8 @@ dump_atk_text (AtkText *atk_text, gchar *text; gint i, start, end; + g_string_append_printf (string, "%*s\n", depth, ""); + text = atk_text_get_text (atk_text, 0, -1); g_string_append_printf (string, "%*stext: %s\n", depth, "", text); g_free (text); @@ -298,6 +300,8 @@ dump_atk_image (AtkImage *atk_image, { gint width, height; + g_string_append_printf (string, "%*s\n", depth, ""); + atk_image_get_image_size (atk_image, &width, &height); g_string_append_printf (string, "%*simage size: %d x %d\n", depth, "", width, height); @@ -311,6 +315,8 @@ dump_atk_action (AtkAction *atk_action, { gint i; + g_string_append_printf (string, "%*s\n", depth, ""); + for (i = 0; i < atk_action_get_n_actions (atk_action); i++) { if (atk_action_get_name (atk_action, i)) @@ -329,6 +335,8 @@ dump_atk_selection (AtkSelection *atk_selection, { gint i; + g_string_append_printf (string, "%*s\n", depth, ""); + g_string_append_printf (string, "%*sselection count: %d\n", depth, "", atk_selection_get_selection_count (atk_selection)); if (atk_selection_get_selection_count (atk_selection) > 0) @@ -350,6 +358,8 @@ dump_atk_value (AtkValue *atk_value, { GValue value = { 0, }; + g_string_append_printf (string, "%*s\n", depth, ""); + atk_value_get_minimum_value (atk_value, &value); g_string_append_printf (string, "%*sminimum value: %g\n", depth, "", g_value_get_double (&value)); atk_value_get_maximum_value (atk_value, &value); @@ -368,6 +378,8 @@ dump_atk_hyperlink_impl (AtkHyperlinkImpl *impl, AtkHyperlink *atk_link; gint i; + g_string_append_printf (string, "%*s\n", depth, ""); + atk_link = atk_hyperlink_impl_get_hyperlink (impl); g_string_append_printf (string, "%*sanchors:", depth, ""); @@ -392,6 +404,8 @@ dump_atk_streamable_content (AtkStreamableContent *content, { gint i; + g_string_append_printf (string, "%*s\n", depth, ""); + g_string_append_printf (string, "%*smime types:", depth, ""); for (i = 0; i < atk_streamable_content_get_n_mime_types (content); i++) g_string_append_printf (string, " %s", atk_streamable_content_get_mime_type (content, i)); diff --git a/tests/a11y/accessible-name.txt b/tests/a11y/accessible-name.txt index 27a4d34d4a..cc427fdf61 100644 --- a/tests/a11y/accessible-name.txt +++ b/tests/a11y/accessible-name.txt @@ -10,12 +10,15 @@ window1 name: Accessible name state: enabled focusable sensitive showing visible toolkit: gail + text: Hello World! character count: 12 caret offset: 0 default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: + image size: -1 x -1 image description: (null) + action 0 name: click action 1 name: press action 2 name: release diff --git a/tests/a11y/hello-world.txt b/tests/a11y/hello-world.txt index b9e20a3b34..1714b4a184 100644 --- a/tests/a11y/hello-world.txt +++ b/tests/a11y/hello-world.txt @@ -10,12 +10,15 @@ window1 name: Hello World! state: enabled focusable sensitive showing visible toolkit: gail + text: Hello World! character count: 12 caret offset: 0 default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: + image size: -1 x -1 image description: (null) + action 0 name: click action 1 name: press action 2 name: release diff --git a/tests/a11y/link.txt b/tests/a11y/link.txt index 70e5bf49fb..7866eff1e3 100644 --- a/tests/a11y/link.txt +++ b/tests/a11y/link.txt @@ -10,13 +10,17 @@ window1 name: Hello World! state: enabled focusable sensitive showing visible toolkit: gail + text: Hello World! character count: 12 caret offset: 0 default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: + image size: -1 x -1 image description: (null) + action 0 name: click action 1 name: press action 2 name: release + anchors: http://www.gtk.org diff --git a/tests/a11y/mnemonic.txt b/tests/a11y/mnemonic.txt index acfdb78768..ea5dc31bf7 100644 --- a/tests/a11y/mnemonic.txt +++ b/tests/a11y/mnemonic.txt @@ -17,6 +17,7 @@ window1 label-for: entry1 state: enabled multi-line sensitive visible toolkit: gail + text: Entry: character count: 6 caret offset: 0 @@ -28,9 +29,11 @@ window1 labelled-by: label1 state: editable enabled focusable sensitive single-line visible toolkit: gail + text: text character count: 4 caret offset: 0 default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:65535,65535,65535 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: + action 0 name: activate action 0 keybinding: e diff --git a/tests/a11y/notebook.txt b/tests/a11y/notebook.txt index 8559e4d054..18258afcce 100644 --- a/tests/a11y/notebook.txt +++ b/tests/a11y/notebook.txt @@ -9,6 +9,7 @@ window1 index: 0 state: enabled focusable sensitive showing visible toolkit: gail + selection count: 1 selected children: 0 Tab 1 @@ -17,6 +18,7 @@ window1 index: 0 name: Tab 1 state: enabled multi-line selectable selected sensitive showing visible + text: Tab 1 character count: 5 caret offset: 0 @@ -27,12 +29,15 @@ window1 name: Yes state: enabled focusable sensitive showing visible toolkit: gail + text: Yes character count: 3 caret offset: 0 default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: + image size: 20 x 20 image description: (null) + action 0 name: click action 0 keybinding: y action 1 name: press @@ -43,6 +48,7 @@ window1 index: 1 name: Tab 2 state: enabled multi-line selectable sensitive showing visible + text: Tab 2 character count: 5 caret offset: 0 @@ -53,12 +59,15 @@ window1 name: No state: enabled focusable sensitive visible toolkit: gail + text: No character count: 2 caret offset: 0 default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: + image size: 20 x 20 image description: (null) + action 0 name: click action 0 keybinding: n action 1 name: press diff --git a/tests/a11y/range.txt b/tests/a11y/range.txt index 574fab91bc..75e3939fc3 100644 --- a/tests/a11y/range.txt +++ b/tests/a11y/range.txt @@ -9,11 +9,14 @@ window1 index: 0 state: enabled focusable horizontal sensitive showing visible toolkit: gail + text: ‎45.5 character count: 5 caret offset: 0 default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size: weight: family-name: stretch: variant: style: language: direction: + action 0 name: activate + minimum value: 0.5 maximum value: 99.5 current value: 45.5 diff --git a/tests/a11y/text.txt b/tests/a11y/text.txt index 716203427e..8293910fd3 100644 --- a/tests/a11y/text.txt +++ b/tests/a11y/text.txt @@ -9,9 +9,11 @@ window1 index: 0 state: editable enabled focusable multi-line sensitive showing visible toolkit: gail + text: Twas brillig, and the slithy toves Did gyre and gimple in the wabe character count: 66 caret offset: 66 default attributes: right-margin:0 left-margin:0 indent:0 pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 rise:0 language: scale:1 fg-color:0,0,0 bg-color:65535,65535,65535 invalid:none invalid:false invalid:false invalid:false left-margin:true invalid:none left-margin:ltr invalid:left size: weight: family-name: invisible:normal invalid:normal invalid:normal + mime types: application/x-gtk-text-buffer-rich-text text/plain -- 2.30.2